#ifndef MERCENARY_H
#define MERCENARY_H

#include <QMainWindow>
#include "Ability.h"
#include <string>
#include <vector>
using namespace std;

namespace Ui {
class Mercenary;
}

class Mercenary : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit Mercenary(QWidget *parent = 0);
    ~Mercenary();
    
private slots:
    void on_primaryBox_editingFinished();

    void on_powerBox_editingFinished();

    void on_critBox_editingFinished();

    void on_alacBox_editingFinished();

    void on_levelBox_editingFinished();

    void on_secondaryBox_editingFinished();

    void on_techBox_editingFinished();

    void on_surgeBox_editingFinished();

    void on_accBox_editingFinished();

    void on_MHmaxBox_editingFinished();

    void on_MHminBox_editingFinished();

    void on_enemyLevelBox_editingFinished();

    void on_enemyArmorBox_editingFinished();

    void on_calcHPSButton_clicked();

    void on_calcWeightButton_clicked();

    void on_upgradeButton_clicked();

    void on_check4pcBox_toggled(bool checked);

    void on_check2pcBox_toggled(bool checked);

    void on_computeAlacrityButton_clicked();

    void on_skillBox_1_editingFinished();

    void on_skillBox_2_editingFinished();

    void on_skillBox_3_editingFinished();

    void on_skillBox_4_editingFinished();

    void on_skillBox_5_editingFinished();

    void on_skillBox_6_editingFinished();

    void on_skillBox_7_editingFinished();

    void on_skillBox_8_editingFinished();

    void on_skillBox_9_editingFinished();

    void on_note1_clicked();

    void on_note2_clicked();

    void on_saveStats_clicked();

    void on_loadStats_clicked();

    void on_tree1_clicked();

    void on_tree2_clicked();

    void on_tree3_clicked();

private:
    Ui::Mercenary *ui;
    //Ability HS;
    //Ability MP;
    void setStats();
    vector <double> calculateStats(vector <double> &stats2);
    void updateStatBoxes();
    void updateCooldowns(double tTime, string ability);
    double calculateHPS();
    double calculateDPS();
    void getWeights();
    void compareUpgrades();
    void computeAlacrity();
    double bodyguardRotation(double rotationTime, vector <double> &stats);
    double bodyguardRotation(int numCasts, vector <double> &stats);
    double gunneryRotation();
    double assaultRotation();
    void Load_Stats();
};


#endif // MERCENARY_H
